home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Personal Computer World 2009 February
/
PCWFEB09.iso
/
Software
/
Linux
/
Kubuntu 8.10
/
kubuntu-8.10-desktop-i386.iso
/
casper
/
filesystem.squashfs
/
usr
/
lib
/
command-not-found
< prev
next >
Wrap
Text File
|
2008-10-15
|
1KB
|
28 lines
#!/usr/bin/python -S
# (c) Zygmunt Krynicki 2005, 2006, 2007, 2008
# Licensed under GPL, see COPYING for the whole text
__version__ = "0.2.21"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/+source/command-not-found"
import CommandNotFound
import sys
from CommandNotFound.util import crash_guard, gettext_wrapper as _
from CommandNotFound import CommandNotFound
from optparse import OptionParser
def main():
parser = OptionParser(version = __version__, usage=_("%prog [options] <command-name>"))
parser.add_option('-d', '--data-dir', action='store',
default="/usr/share/command-not-found",
help=_("use this path to locate data fields"))
parser.add_option('--ignore-installed', '--ignore-installed',
action='store_true', default=False,
help=_("ignore local binaries and display the available packages"))
(options, args) = parser.parse_args()
if len(args) == 1:
CommandNotFound(options.data_dir).advise(args[0], options.ignore_installed)
if __name__ == "__main__":
crash_guard(main, BUG_REPORT_URL, __version__)